package com.jier.vo.admin;

import com.jier.entities.SystemModule;
import io.swagger.annotations.ApiModelProperty;

import java.util.List;

/**
 * @author jie_r
 * @date 2018/03/08
 */
public class SystemModuleVo {
    /**
     * 菜单ID
     */
    @ApiModelProperty(value = "菜单ID", dataType = "String")
    private String id;
    /**
     * 菜单名称
     */
    @ApiModelProperty(value = "菜单名称", dataType = "String")
    private String title;
    /**
     * 菜单图标
     */
    @ApiModelProperty(value = "菜单图标", dataType = "String")
    private String icon;
    /**
     * 菜单链接
     */
    @ApiModelProperty(value = "菜单链接", dataType = "String")
    private String href;
    /**
     * 菜单子项
     */
    @ApiModelProperty(value = "菜单子项", dataType = "List")
    private List<SystemModuleVo> children;

    public SystemModuleVo(SystemModule systemModule) {
        this.id = String.valueOf(systemModule.getId());
        this.title = systemModule.getName();
        this.icon = systemModule.getIcon();
        this.href = systemModule.getHref();
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public String getHref() {
        return href;
    }

    public void setHref(String href) {
        this.href = href;
    }

    public List<SystemModuleVo> getChildren() {
        return children;
    }

    public void setChildren(List<SystemModuleVo> children) {
        this.children = children;
    }
}
